.dataset-compliance-fields {
  $compliance-suggestion-color: get-color(orange5);
  $compliance-readonly-color: get-color(red7);
  $compliance-review-required-color: get-color(blue5);
  $compliance-ok-color: get-color(green5);

  @mixin mimic-select {
    $color: set-color(grey, light);
    $default-border: (1px solid shade($color, 20%));
    max-width: item-spacing(9) * 3;
    display: inline-flex;
    align-items: center;
    height: 34px;
    width: 100%;
    border: $default-border;
    border-radius: 2px;
    background-color: set-color(white, base);
    padding: item-spacing(0 4 0);
    position: relative;

    &:after {
      color: shade($color, 20%);
      content: '\e259';
      font-weight: normal;
      pointer-events: none;
      font-family: $glyphicons-stack;
      position: absolute;
      right: item-spacing(2);
    }
  }

  &__filter-count {
    color: $compliance-suggestion-color;
    margin-left: item-spacing(2);
  }

  &__subtitle {
    display: flex;
    align-items: center;
    padding: item-spacing(2 0);
  }

  &__review-hint {
    color: $compliance-suggestion-color;
    height: item-spacing(5);
    padding-left: item-spacing(5);
  }

  &__has-suggestions {
    color: $compliance-suggestion-color;
    margin-left: item-spacing(2);

    &__icon {
      color: $compliance-suggestion-color;
    }
  }

  &__notification-column {
    width: 5%;
  }

  &__identifier-column {
    width: 30%;
  }

  &__identifier-cell {
    text-align: right;
  }

  &__tall-cell#{&}__tall-cell {
    vertical-align: top;
  }

  &__current-value {
    display: inline-block;
    height: 0;
    padding: item-spacing(1);
    color: set-color(grey, mid);
  }

  &__form-input {
    padding: item-spacing(2 0);
    margin-top: item-spacing(2);
    opacity: 0.8;
  }

  &--readonly {
    &#{&}#{&} {
      color: get-color(slate5);
      opacity: 0.7;
      cursor: not-allowed;
    }

    &__icon {
      &#{&} {
        color: $compliance-readonly-color;
        opacity: 0.9;
      }
    }
  }

  &--review-required {
    &__icon {
      color: $compliance-review-required-color;
    }
  }

  &--ok {
    &__icon {
      color: $compliance-ok-color;
    }
  }

  &--missing-selection {
    &#{&}#{&} {
      $invalid-color: get-color(red7, 0.6);

      background-color: $invalid-color;
      border-color: $invalid-color;
      color: get-color(white);

      &::after {
        content: '?';
        color: get-color(white);
      }
    }
  }

  &__add-field {
    &#{&} {
      font-weight: fw(normal, 4);
      display: block;
    }
  }

  &__guided-modal {
    @include nacho-container;
    padding: 0;
    border: 0;
    z-index: z(modal);
  }

  &__tag-radio {
    $hover-state: get-color(gray1);

    width: 100%;
    padding: item-spacing(1 2 0 4);

    .ember-radio-button {
      color: get-color(black, 0.6);
      left: 0;
      width: 100%;

      &::before,
      &::after {
        display: none;
      }
    }

    &:hover {
      background-color: $hover-state;
    }

    &--disabled {
      background-color: get-color(slate2);
      position: sticky;
      top: -1px;
      z-index: 1;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.085);

      &::before {
        position: absolute;
        right: item-spacing(0);
        color: black;
      }

      &:hover {
        background-color: get-color(slate2);
      }

      .ember-radio-button {
        color: black;
        font-weight: fw(normal, 6);
        cursor: default;
      }
    }

    &--checked {
      background-color: get-color(blue0);

      &:hover {
        background-color: $hover-state;
      }

      .ember-radio-button {
        color: get-color(blue7);
      }
    }
  }

  &__compliance-info-column {
    display: flex;
    flex-direction: column;

    &:first-of-type {
      min-width: 280px;
    }

    &__title {
      padding: item-spacing(3);
      background-color: get-color(slate1);
      border-right: 1px solid get-color(slate2);
    }

    &__content {
      position: relative;
      display: flex;
      flex-direction: column;
      height: 100%;
      padding: item-spacing(0 0 4);
      overflow-y: scroll;
      overflow-x: hidden;
      border-right: 1px solid get-color(slate2);
    }
  }

  &__tag-item {
    display: flex;
    flex-wrap: nowrap;
  }

  &__tag-info {
    padding: item-spacing(1);
    margin-bottom: item-spacing(2);

    &--editable {
      @include mimic-select;
      padding: item-spacing(0 5 0 4);
    }

    &__text {
      width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0;

      &--obscure {
        color: get-color(gray4);
      }
    }
  }

  &__rollup-toggle {
    &#{&} {
      color: get-color(slate10);
    }
  }

  &__remove-tag {
    &#{&} {
      background-color: transparent;
      text-align: center;
      text-decoration: none;
      vertical-align: middle;
      cursor: pointer;
      box-sizing: border-box;
      color: get-color(black, 0.7);
      border: 0;
    }
  }

  &__field-tag {
    height: 50vh;
    display: flex;
    flex-direction: column;

    &__content {
      display: flex;
      height: calc(50vh - 48px);
    }

    &__quick-desc {
      padding: item-spacing(4);
      max-width: item-spacing(8) * 4;
    }

    &__footer {
      text-align: right;
      height: item-spacing(7);
      padding: item-spacing(1);
      background-color: get-color(slate1);
      border-right: 1px solid get-color(slate2);
      position: absolute;
      width: 100%;
      bottom: 0;
    }
  }

  &__suggested-values {
    display: inline-flex;
    align-items: center;
    width: 100%;
  }

  &__suggestion-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: nowrap;
  }

  &__resolution {
    color: get-color(red5);

    &--ok {
      color: $compliance-ok-color;
    }
  }

  &__suggested-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    &--no-res {
      color: $compliance-suggestion-color;
    }
  }

  &__search {
    padding: item-spacing(1);
  }

  &__text-pattern-wrap {
    $error-font-size: 12px;
    padding: item-spacing(1 4);
    position: relative;
    display: flex;
    flex-direction: column;

    &--error {
      font-size: $error-font-size;
      position: absolute;
      bottom: -18px;
      color: get-color(red7);
    }
  }

  &__text-pattern {
    padding: (item-spacing(3) / 2) item-spacing(2);
    white-space: pre;
    font-family: monospace;
    outline: none;
  }

  &__id-field-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
  }

  &__manual-entry-errors {
    margin-left: item-spacing(2);
  }
}

.dataset-compliance-editor {
  pre {
    border-radius: item-spacing(1) / 2;
  }
}

.compliance-depends {
  display: none;
  opacity: 0;

  &--visible {
    opacity: 1;
    display: block;
    transition: all 0.4s ease 0.4s;
  }
}
